import axios from "./axios";
import { header1,header2 } from "./common";
import {api} from '../api/index'
import type { user } from "../types/user";
//登录
export function user_Login(username:string,password:string){
    return axios({
        method:'post',
        url:api.user.user_Login,
        headers:{
            ...header1
        },
        data:{
            username,password
        }
    })
}
//注册
export function user_Register(user:user){
    let {username,password,phone}=user
    return axios({
        method:'post',
        url:api.user.user_Register,
        headers:{
            ...header2,
            
        },
        data:{
            username,
            password,
            phone
        }
    })
}
